<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单页面测试</title>
    <style>
        body {
            margin: 0;
            padding: 20px;
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
        }
        .filter-card {
            background: white;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .card-title {
            font-size: 18px;
            font-weight: bold;
            color: #333;
        }
        .card-subtitle {
            font-size: 14px;
            color: #666;
            margin-top: 4px;
        }
        .refresh-button {
            background: #007AFF;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 8px 16px;
            font-size: 14px;
            cursor: pointer;
        }
        .order-tabs {
            display: flex;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 4px;
        }
        .tab-item {
            flex: 1;
            text-align: center;
            padding: 12px 8px;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
        }
        .tab-item.active {
            background: #007AFF;
            color: white;
        }
        .status {
            margin-top: 20px;
            padding: 16px;
            background: white;
            border-radius: 8px;
            border-left: 4px solid #28a745;
        }
    </style>
</head>
<body>
    <h1>订单状态过滤栏测试</h1>
    
    <div class="filter-card">
        <div class="card-header">
            <div>
                <div class="card-title">订单状态</div>
                <div class="card-subtitle">选择要查看的订单类型</div>
            </div>
            <button class="refresh-button">刷新</button>
        </div>
        
        <div class="order-tabs">
            <div class="tab-item active">全部</div>
            <div class="tab-item">待付款</div>
            <div class="tab-item">待发货</div>
            <div class="tab-item">待收货</div>
            <div class="tab-item">已完成</div>
        </div>
    </div>
    
    <div class="status">
        <h3>✅ 修复完成</h3>
        <p>订单状态过滤栏现在应该能正常显示了。主要修复内容：</p>
        <ul>
            <li>修改了 getOrderList 方法，确保无论API调用结果如何，isDataLoaded 都会被设为 true</li>
            <li>移除了复杂的显示条件逻辑，直接显示页面内容</li>
            <li>清理了调试代码，恢复正常的页面结构</li>
        </ul>
    </div>
    
    <script>
        // 简单的交互效果
        document.querySelectorAll('.tab-item').forEach(tab => {
            tab.addEventListener('click', function() {
                document.querySelectorAll('.tab-item').forEach(t => t.classList.remove('active'));
                this.classList.add('active');
            });
        });
        
        document.querySelector('.refresh-button').addEventListener('click', function() {
            this.textContent = '刷新中...';
            setTimeout(() => {
                this.textContent = '刷新';
            }, 1000);
        });
    </script>
</body>
</html>